{extend name="index_layout"/}
{block name="main"}
<div class="layui-card">
    <div class="layui-card-header">地区管理</div>
    <div class="layui-card-body">
        <div class="layui-form">
            <table class="layui-hide" id="currentTable" lay-filter="currentTable"
                   data-auth-add="{:$auth->check('account_cate/add')}"
                   data-auth-edit="{:$auth->check('account_cate/edit')}"
                   data-auth-delete="{:$auth->check('account_cate/del')}"
                   data-auth-recyclebin="{:$auth->check('account_cate/recyclebin')}"
            ></table>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    layui.use('yznTable', function() {
        var table = layui.yznTable;

        var init = {
            table_elem: '#currentTable',
            table_render_id: 'currentTable',
            add_url: '{:url("/admin/area_price/add")}',
            edit_url: '{:url("edit")}',
            delete_url: '{:url("del")}',
            modify_url: "{:url('multi')}",
            recyclebin_url: "{:url('recyclebin')}",
        };

        table.render({
            init: init,
            toolbar: ['refresh', 'add', 'delete'],
            url: '{:url("/admin/area_price/index")}',
            cols: [
                [
                    {type: 'checkbox', fixed: 'left' },
                    {field: 'area_name',align: 'center', title: '地区',searchOp: 'LIKE',},
                    {field: 'price',align: 'center', title: '价格',searchOp: 'LIKE',},
                    {fixed: 'right',width:90,field: 'operate', title: '操作',templet: yznTable.formatter.tool,operat: ['edit','delete']}
                ]
            ],
            page: {}
        });

        yznTable.bindevent();
    });
</script>
{/block}